[SUBROUTINE]
version = 1.14
icon = taper-ida.png
name = _("Taper IDA")
type = taper_ida
help = _("<b>Inside taper by angle and small/large diameter/radius</b>&#10;Cutter orientation should be 3, 9 or None")
order = act hx b_x e_x hz b_z hp a pa hf fin

[PARAM_ACT]
name = _("Active")
icon = enable.png
type = bool
value = 1

[PARAM_HX]
name = _("X axis")
type = sub-header

[PARAM_B_X]
name = _("Small diameter")
type = float
icon = taperi-x-sd.png
value = 0.8
metric_value = 20.0
minimum_value = 0.0
not_allowed = 0
header = hx

[PARAM_E_X]
name = _("Large diameter")
type = float
icon = taperi-x-ld.png
value = 1.0
metric_value = 25.0
minimum_value = 0.0
header = hx

[PARAM_HZ]
name = _("Z axis")
type = sub-header

[PARAM_B_Z]
name = _("Begin")
type = float
icon = taperi-z-ld.png
value = 0.0
metric_value = 0.0
header = hz
tool_tip = _("End will be defined by angle")

[PARAM_HP]
name = _("Params")
type = sub-header

[PARAM_A]
name = _("Angle")
type = float
digits = 2
icon = angle.png
tool_tip = _("0 &#176; &lt; Angle &lt; 90 &#176;")
value = 12.0
maximum_value = 90.0
minimum_value = 0.0
not_allowed = 0:90
header = hp
suffix = &#176;

[PARAM_PA]
name = _("Path")
type = combo
options = _("Follow drive line=0:Angular=1")
value = 0
header = hp
;icon =
;tool_tip =

[PARAM_HF]
name = _("Finishing")
type = sub-header

[PARAM_FIN]
name = _("Number of passes")
icon = finish.png
type = int
value = 1
minimum_value = 0
tool_tip = _("Or spring passes")
header = hf

[VALIDATION]
content =
	if #param_act == 1 :
		if self.check_hash('#param_b_x', 0) == self.check_hash('#param_e_x', 1) :
			self.msg_inv(_('Diameters must be different'), 1)
			VALIDATED = False
			
		if TOOL_TABLE.get_tool_orient() not in [0, 3, 8, 9] :
			self.msg_inv(_('Cutter orientation should be 8, 3, 9 or 0'), 2)
		
[CALL]
content =
	(begin #sub_name)
	(author : Fernand Veilleux)
	
	o<#self_id_act> if [#param_act]
		o<taper_id> CALL [#param_b_x] [#param_e_x] [#param_b_z] [#param_a] [#param_fin] [#param_pa]
	o<#self_id_act> endif
	
	(end #sub_name)
